package org.indp.mongowl.ui.container;

import com.mongodb.DBObject;
import com.vaadin.data.Property;

/**
 *
 */
public class DBObjectProperty implements Property<DBObject> {

    private DBObject object;

    public DBObjectProperty(DBObject object) {
        this.object = object;
    }

    @Override
    public DBObject getValue() {
        return object;
    }

    @Override
    public void setValue(DBObject newValue) throws ReadOnlyException {
        throw new ReadOnlyException();
    }

    @Override
    public Class<? extends DBObject> getType() {
        return DBObject.class;
    }

    @Override
    public boolean isReadOnly() {
        return true;
    }

    @Override
    public void setReadOnly(boolean newStatus) {
    }
}
